#!/usr/bin/env python
#coding=utf-8
import socket

def getIpAddresses():
    addrList = socket.getaddrinfo(socket.gethostname(), None)

    ipList=[]
    for item in addrList:
        print "Item:", item
        ipList.append(item[4][0])

    return ipList

allip=getIpAddresses()
print 'get all ip address:'
for ip in allip:
    print ip
